package com.xiashitech.interfaces.apiservice.dto.base;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.*;

import java.util.List;

@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Table {
    /**
     * 表名
     */
    private String tabName;

    /**
     * 表的tag
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private List<Tag> tabTags;

    /**
     * 表权限
     */
    @Builder.Default
    private Boolean tabAuth = Boolean.FALSE;

    /**
     * 表权限鉴权原因
     */
    @Builder.Default
    private String tabAuthReason = "none";

    /**
     * 表的字段名
     */
    private List<Column> columns;

    /**
     * 标记是否访问该表的所有字段，针对select * from table情况
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Boolean allColumn;
}
